/**
 * Created by jijin on 2017/7/22.
 */
import React, { Component } from 'react';
import {
  View,
  TabBarIOS
} from 'react-native';

export default class MenuItem extends Component {
  render() {
    let TabBarItem = this.props.itemComponent || TabBarIOS.Item;
    const _onPressItem = () => {
      this.props.onPress(this.props.id);
    };
    return (
      <TabBarItem
        {...this.props}
        onPress={_onPressItem}
      >
        {this.props.children}
      </TabBarItem>
    )
  }
}